package com.example.demo.service;

import com.example.demo.entity.CommentInfo;
import com.example.demo.mapper.CommentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CommentService {
    @Autowired
    private CommentMapper commentMapper;

    public int add(CommentInfo commentInfo){
        return commentMapper.add(commentInfo);
    }
    public List<CommentInfo> initComment(Integer article_id){
        return commentMapper.initComment(article_id);
    }
}
